package com.ghca.myinfo3.system.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ghca.myinfo3.common.eneity.IDEntity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import java.io.Serializable;

/**
 * Created by Administrator on 2016/12/18.
 */
@Entity
public class User extends IDEntity {

    public static final int STATUS_ENABLE = 0;

    public static final int STATUS_DISABLE = 1<<1;

    public static final int STATUS_LOCKED = 1<<2;

    public static final int STATUS_EXPERIED = 1<<3;

    private String number;

    private String username;

    private String realname;

    private String password;

    private Integer status;

    private String email;

    private String cellphone;

    private String qq;

    private Boolean activitiUser;

    @ManyToOne
    @JsonIgnore
    private Role role;

    @ManyToOne
    @JsonIgnore
    private Department department;


    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getCellphone() {
        return cellphone;
    }

    public void setCellphone(String cellphone) {
        this.cellphone = cellphone;
    }

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public Boolean getActivitiUser() {
        return activitiUser;
    }

    public void setActivitiUser(Boolean activitiUser) {
        this.activitiUser = activitiUser;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public Department getDepartment() {
        return department;
    }

    public void setDepartment(Department department) {
        this.department = department;
    }
}
